import pytest
from ..Operation.Login_Operation import Login_Operation
from ..Data.Data import Data


class Test_login(Login_Operation):
    da = Data()

    # 执行成功的测试用例
    @pytest.mark.parametrize('name,pwd,expect', da.readExcel(sheetname='登录'))
    def test_login_1(self, name,pwd,expect):
        driver = self.driver()
        result = self.GetSuccessResult(self.login(name, pwd, driver))
        self.assertResult(result, expect, driver)
